resource "google_dataproc_metastore_service" "<%= ctx[:primary_resource_id] %>" {
  provider   = google-beta
  service_id = "<%= ctx[:vars]['metastore_service_name'] %>"
  location   = "us-central1"
  port       = 9080
  tier       = "DEVELOPER"

  maintenance_window {
    hour_of_day = 2
    day_of_week = "SUNDAY"
  }

  hive_metastore_config {
    version = "2.3.6"
  }
}